<?php defined('InShopNC') or exit('Access Invalid!');?>
<div class="ncm-container">
<?php include template('member/member_left');?>
  <div class="right-layout">
<div class="ncm-index-container">
<div class="w66 ml-1">
  <div id="account" class="normal mt-1">
    <div class="outline">
      <div class="user-account">
        <ul>
          <li id="pre-deposit"><a href="index.php?act=predeposit&op=pd_log_list" title="查看我的余额">
            <h5>账户余额</h5>
            <span class="icon"></span> <span class="value">￥<em><?php echo $output['member_info']['available_predeposit'];?></em></span></a>
		  </li>
		  <?php if (intval(C('voucher_allow')) == 1){?>
          <li id="voucher"><a href="index.php?act=member_voucher&op=index" title="查看我的代金券">
            <h5>代金券</h5>
            <span class="icon"></span> <span class="value"><em><?php echo $output['member_info']['voucher'];?></em>张</span></a>
		  </li>
		  <?php } ?>
		  <?php if (intval(C('points_isuse')) == 1){?>
          <li id="points"><a href="index.php?act=member_points&op=index" title="查看我的积分">
            <h5>可用积分</h5>
            <span class="icon"></span> <span class="value"><em><?php echo $output['member_info']['member_points'];?></em>分</span></a>
		  </li>
		  <?php } ?>
        </ul>
      </div>
    </div>
  </div>
 <div id="transaction" class="normal mt-1">
    <div class="outline">
      <div class="title">
        <h3>交易提醒</h3>
        <ul>
          <li><a href="index.php?act=member_order&state_type=state_new">待付款<em><?php echo $output['member_info']['order_nopay'];?></em></a></li>
          <li><a href="index.php?act=member_order&state_type=state_send">待收货<em><?php echo $output['member_info']['order_noreceiving'];?></em></a></li>
          <li><a href="index.php?act=member_order&state_type=state_noeval">待评价<em><?php echo $output['member_info']['order_noeval'];?></em></a></li>
        </ul>
      </div>


      <div class="order-list">
        <ul>
			<?php if ($output['order_group_list']) { ?>
			<?php foreach ($output['order_group_list'] as $order_pay_sn => $group_info) { ?><?php $p = 0;?>
			<?php foreach($group_info['order_list'] as $order_id => $order_info) {?>
			<?php if ($order_info['order_state']>=10 && $order_info['evaluation_state'] == 0 && TIMESTAMP - $order_info['add_time'] <= 86400*30) { ?>
			<?php foreach ((array)$order_info['extend_order_goods'] as $k => $goods_info) {?>
			<?php if ((count($order_info['extend_order_goods']) > 1 && $k ==0) || (count($order_info['extend_order_goods']) == 1)){?>
			<li>
				<div class="ncm-goods-thumb"><a target="_blank" href="index.php?act=member_order&op=show_order&order_id=<?php echo $order_info['order_id']; ?>"><img src="<?php echo thumb($goods_info,60);?>" /></a><?php if (count($order_info['extend_order_goods']) > 1) {?><em><?php echo count($order_info['extend_order_goods']);?></em><?php } ?></div>
				<dl class="ncm-goods-info">
				  <dt><a href="index.php?act=member_order&op=show_order&order_id=<?php echo $order_info['order_id']; ?>" target="_blank"><?php echo $goods_info['goods_name']; ?></a>
				  <?php if (count($order_info['extend_order_goods']) > 1) {?><span>等<strong><?php echo count($order_info['extend_order_goods']);?></strong>件商品</span><?php } ?>
				  </dt>
				  <dd><span class="order-date">下单时间：<?php echo date("Y-m-d H:i:s",$order_info['add_time']); ?></span><span class="ncm-order-price">订单金额：<em>￥<?php echo $order_info['order_amount']; ?></em></span></dd>
				  <dd><span class="order-state">订单状态：<?php echo $order_info['state_desc']; ?><?php echo $order_info['evaluation_status'] ? $lang['member_order_evaluated'].'<br/>' : '';?>
				  <?php if ($order_info['if_deliver'] && $order_info['order_state'] == 30){ ?>
				  <a href='index.php?act=member_order&op=search_deliver&order_id=<?php echo $order_info['order_id']; ?>&order_sn=<?php echo $order_info['order_sn']; ?>' target="_blank"><i class="icon-truck"></i>查看物流</a>
				  <?php } ?></span>
				  </dd>
				</dl>
				<?php if (!empty($group_info['pay_amount']) && $p == 0) {?>
				<a href="index.php?act=buy&op=pay&pay_sn=<?php echo $order_pay_sn; ?>" target="_blank" class="ncm-btn">订单支付</a>
				<?php } elseif ($order_info['if_evaluation']) { ?>
				<a href="index.php?act=member_evaluate&op=add&order_id=<?php echo $order_info['order_id']; ?>" target="_blank" class="ncm-btn">交易评价</a>
				<?php }else{ ?>
				<a href="index.php?act=member_order&op=show_order&order_id=<?php echo $order_info['order_id']; ?>" target="_blank" class="ncm-btn">查看订单</a>
				<?php }?>
				<?php $p++;?>
			</li>
			<?php } ?><?php } ?>
			<?php } ?>
			<?php }} ?>
			<?php } else { ?>
	<dl class="null-tip">
        <dt></dt>
        <dd>
          <h4>你买的东西太少了，这里空空的，快去挑选合适的商品吧！</h4>
        </dd>
      </dl>
			<?php } ?>
        </ul>
      </div>
    </div>
  </div>


  <div id="favoritesGoods" class="normal mt-1">
    <div class="outline">
      <div class="title">
        <h3>商品收藏</h3>
      </div>
	  <?php if(!empty($output['favorites_list']) && is_array($output['favorites_list'])){ ?>
      <div class="ncm-favorites-goods">
        <ul id="favoritesGoodsList" class="jcarousel-skin-tango">
		  <?php foreach($output['favorites_list'] as $key=>$favorites){?>
          <li>
            <div class="ncm-goods-thumb-120"><a href="index.php?act=goods&goods_id=<?php echo $favorites['goods']['goods_id'];?>" target="_blank"><img alt="" src="<?php echo thumb($favorites['goods'], 240);?>"></a>
              <div class="ncm-goods-price"><em>￥<?php echo ncPriceFormat($favorites['goods']['goods_price']);?></em></div>
            </div>
            <div class="ncm-goods-name"><a href="index.php?act=goods&goods_id=<?php echo $favorites['goods']['goods_id'];?>" title="<?php echo $favorites['goods']['goods_name'];?>" target="_blank"><?php echo $favorites['goods']['goods_name'];?></a></div>
          </li>
		  <?php }?>
        </ul>
        <div class="more"><a target="_blank" href="index.php?act=member_favorites&op=fglist">查看收藏的所有商品</a></div>
      </div>

	  <?php }else{ ?>
	  <dl class="null-tip">
		<dt></dt>
		<dd>
		  <h4>您还没有收藏商品</h4>
		  <h5>收藏的商品将显示最新的促销活动和降价情况</h5>
		</dd>
	  </dl>
	  <?php } ?>
    </div>
  </div>

  
  
  
</div>
<div class="w33 ml-1">

 
  <div id="shopping" class="normal mt-1">
    <div class="outline">
      <div class="title">
        <h3>购物车</h3>
      </div>
		<?php if(!empty($output['cart_list'])){?>
        <div class="cart-list">
			<ul>
			<?php foreach($output['cart_list'] as $num => $cart_list) {?>
			<?php if ( $num < 3) {?>
			<li>
				<div class="ncm-goods-thumb"><a target="_blank" href="<?php echo urlShop('goods', 'index', array('goods_id' => $cart_list['goods_id'])); ?>"><img src="<?php echo thumb($cart_list,60); ?>"></a></div>
				<dl class="ncm-goods-info">
				  <dt><a href="<?php echo urlShop('goods', 'index', array('goods_id' => $cart_list['goods_id'])); ?>"><?php echo $cart_list['goods_name']; ?></a></dt>
				  <dd><span class="ncm-order-price">商城价：<em>￥<?php echo $cart_list['goods_price']; ?></em> X <?php echo $cart_list['goods_num']; ?></span><!-- <span class="sale">限时折扣</span> --></dd>
				</dl>
			</li>
			<?php }?>
			<?php }?>
			</ul>
			<div class="more"><a href="index.php?act=cart">查看购物车所有商品</a></div>
		</div>
		<?php }else{?>
		<dl class="null-tip">
		  <dt></dt>
		  <dd>
			<h4>您的购物车还是空的</h4>
			<h5>将想买的商品放进购物车，一起结算更轻松</h5>
		  </dd>
		</dl>
		<?php }?>
    </div>
  </div>
  
  <div id="favoritesStore" class="normal mt-1">
    <div class="outline">
      <div class="title">
        <h3>店铺收藏</h3>
      </div>
		<?php if(!empty($output['favorites_store_list']) && is_array($output['favorites_store_list'])){?>
        <div class="ncm-favorites-store">
        <ul id="favoritesStoreList" class="jcarousel-skin-tango">
		<?php foreach($output['favorites_store_list'] as $key=>$favorites){?>
          <li>
            <div class="ncm-store-pic"><a href="<?php echo urlShop('show_store', 'index', array('store_id'=>$favorites['store']['store_id']), $favorites['store']['store_domain'])?>" target="_blank"><img alt="" src="<?php echo getStoreLogo($favorites['store']['store_label']);?>"></a></div>
            <dl>
              <dt class="ncm-goods-name"><a href="<?php echo urlShop('show_store', 'index', array('store_id'=>$favorites['store']['store_id']), $favorites['store']['store_domain'])?>" title="<?php echo $favorites['store']['store_name'];?>" target="_blank"><?php echo $favorites['store']['store_name'];?></a></dt>
               <dd></dd>
            </dl>
          </li>
          <?php }?>
        </ul>
        <div class="more"><a target="_blank" href="index.php?act=member_favorites&op=fslist">查看收藏的所有店铺</a></div>
      </div>
	  <?php }else{?>
      <dl class="null-tip">
        <dt></dt>
        <dd>
          <h4>您还没有收藏店铺</h4>
          <h5>收藏店铺可获知店铺最新商品和促销活动</h5>
        </dd>
      </dl>
	  <?php }?>
	</div>
  </div>

  
</div> 
   
</div>


  </div>

  <div class="clear"></div>
</div>
<script type="text/javascript">
$(function(){
	//信息轮换
	$.getScript("<?php echo RESOURCE_SITE_URL;?>/js/jcarousel/jquery.jcarousel.min.js", function(){
	    $('#favoritesGoodsList').jcarousel({visible: 4,itemFallbackDimension: 300});
		$('#favoritesStoreList').jcarousel({visible: 3,itemFallbackDimension: 300});
		$('#friendsShareList').jcarousel({visible: 3,itemFallbackDimension: 300});
		$('#circleList').jcarousel({visible: 3,itemFallbackDimension: 300});
		$('#browseMarkList').jcarousel({visible: 3,itemFallbackDimension: 300});
	});
});
</script>


  </div>
  <div class="clear"></div>
</div>